﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using FC.Model;


namespace FC.ViewModel.IterationVMs
{
    public partial class IterationTemplateVM : BaseTemplateVM
    {
        public ExcelPropety ChargeUser_Excel = ExcelPropety.CreateProperty<Iteration>(x => x.ChargeUserId);
        [Display(Name = "迭代名称")]
        public ExcelPropety Name_Excel = ExcelPropety.CreateProperty<Iteration>(x => x.Name);
        [Display(Name = "开始时间")]
        public ExcelPropety StartTime_Excel = ExcelPropety.CreateProperty<Iteration>(x => x.StartTime);
        [Display(Name = "结束时间")]
        public ExcelPropety EndTime_Excel = ExcelPropety.CreateProperty<Iteration>(x => x.EndTime);

	    protected override void InitVM()
        {
            ChargeUser_Excel.DataType = ColumnDataType.ComboBox;
            ChargeUser_Excel.ListItems = DC.Set<FrameworkUser>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class IterationImportVM : BaseImportVM<IterationTemplateVM, Iteration>
    {

    }

}
